package com.intelligencesoft.pss.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView;

import com.intelligencesoft.pss.entity.base.UserInfo;
import com.intelligencesoft.pss.entity.binding.BindingList;
import com.intelligencesoft.pss.service.UserInfoService;
import com.intelligencesoft.pss.service.binding.UserBindingService;

@Controller
@RequestMapping(value="/person")
public class PersonController {
	@Autowired
	private UserInfoService userInfoService;
	
	@RequestMapping(value="/showPersonList",method=RequestMethod.GET)
	@ResponseBody
	public List<UserInfo> showPersonList(){
		List<UserInfo> userList = userInfoService.findByUserInfoList();
		return userList;
	}
	@RequestMapping(value="/trunToPerList",method=RequestMethod.GET)
	public ModelAndView trunToPerList(){
		ModelAndView m = new ModelAndView();
		m.setViewName("/admin/perList");
		return m;
	}
}
